<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>子选择器</title>
    <style>
        .nav>a {
            color: red;
        }
    </style>
</head>
<body>
<div class="nav">
    <a href="">div的子元素</a>
    <p><a href="">孙子的元素</a></p>
</div>
</body>
</html>